<?
$sub_menu = "230440";
include_once("./_common.php");

auth_check($auth[$sub_menu], "w");

if ($w == "u") {
    $mp = sql_fetch("select * from $mw_cash[membership_board_table] where mp_id = '$mp_id'");
}

$g4['title'] = "멤버쉽 권한";
include_once ("$g4[admin_path]/admin.head.php");
?>
<style>
table.tconfig tbody td:first-child { width:30%; color:#616161; padding:5px 0px 5px 10px; font-weight:bold; text-align: right; }
table.tconfig tbody td:nth-child(2) { width:70%; color:#868686; padding:5px 10px 5px 10px; }
</style>

<table width=100% cellpadding=0 cellspacing=0 border=0>
<colgroup width=30% class='col1 pad1 bold right'>
<colgroup width=70% class='col2 pad2'>
<tr class='ht'>
    <td colspan=4 align=left><?=subtitle($g4[title])?></td>
</tr>
<tr><td colspan=4 class=line1></td></tr>
</table>

<form name="fconfig" method="post" action="mw.membership.board.update.php">
<input type="hidden" name="w" value="<?=$w?>">
<input type="hidden" name="mp_id" value="<?=$mp_id?>">

<table width=100% cellpadding=0 cellspacing=0 border=0 class="tconfig">
<colgroup width=30% class='col1 pad1 bold right'>
<colgroup width=70% class='col2 pad2'>
<tr class='ht'>
    <td>멤버쉽</td>
    <td>
        <select name="ms_id" required itemname="멤버쉽">
        <option value=""> </option>
        <?
        $sql = "select * from $mw_cash[membership_table] order by ms_id";
        $qry = sql_query($sql);
        while ($row = sql_fetch_array($qry)) {
        ?>
        <option value="<?=$row[ms_id]?>"><?=$row[ms_name]?></option>
        <? } ?>
        </select>

        <script type="text/javascript">
        document.fconfig.ms_id.value = "<?=$mp[ms_id]?>";
        </script>
    </td>
</tr>

<tr class='ht'>
    <td> 게시판 </td>
    <td>
        <select name="bo_table" required itemname="게시판">
        <option value=""> </option>
        <?
        $sql = "select * from $g4[board_table]";
        $qry = sql_query($sql);
        while ($row = sql_fetch_array($qry)) {
        ?>
        <option value="<?=$row[bo_table]?>"> <?=$row[bo_subject]?> </option>
        <?  } ?>
        </select>
        <script type="text/javascript">
        document.fconfig.bo_table.value = "<?=$mp[bo_table]?>";
        </script>
    </td>
</tr>
<tr class='ht'>
    <td> 접근권한 </td>
    <td>
        <input type="checkbox" name="mp_list" value="1"> 목록
        <input type="checkbox" name="mp_view" value="1"> 내용 
        <input type="checkbox" name="mp_down" value="1"> 다운 
        <input type="checkbox" name="mp_write" value="1"> 쓰기
        <input type="checkbox" name="mp_comment" value="1"> 코멘트
        <script type="text/javascript">
        fconfig.mp_list.checked = "<?=$mp[mp_list]?>";
        fconfig.mp_view.checked = "<?=$mp[mp_view]?>";
        fconfig.mp_down.checked = "<?=$mp[mp_down]?>";
        fconfig.mp_comment.checked = "<?=$mp[mp_comment]?>";
        </script>
    </td>
</tr>
</table>
<br/>
<br/>
<br/>

<p align=center>
    <input type=submit class=btn1 accesskey='s' value='  확  인  '>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <input type=button class=btn1 value='  목  록  ' onclick="document.location.href='mw.membership.board.php';">
</p>

</form>



<?
include_once ("$g4[admin_path]/admin.tail.php");
?>

